package 幂和对数.幂3;

/**
 * TODO
 *
 * @className: m3
 * @description: TODO
 * @author: 等什么柠檬君
 * @date: 2022-04-27 17:40
 **/
public class m3 {
    public static void main(String[] args) {

    }
    public static boolean isPowerOfThree(int n) {
        return n > 0 && Math.pow(3, (float)(Math.log(n)/Math.log(3)))==n;
    }
}
